import request from '@/utils/request'

// 获取列表
export function getList(data) {
  return request({
    url: '/admin/equipment/getPage',
    method: 'post',
    data
  })
}

// 获取设备详情
export function getdetail(uuid) {
  return request({
    url: '/admin/equipment/details',
    method: 'post',
    data: {
      uuid
    }
  })
}

// 获取桶列表
export function getbarrelList(deviceId) {
  return request({
    url: '/admin/equipment/getBarrelList',
    method: 'post',
    data: {
      deviceId
    }
  })
}

// 添加
export function addroles(params) {
  return request({
    url: '/admin/equipment/save',
    method: 'post',
    params
  })
}

// 提交修改
export function sureEdit(params) {
  return request({
    url: '/admin/equipment/update',
    method: 'post',
    params
  })
}

// 删除
export function shanchu(uuid) {
  return request({
    url: '/admin/equipment/delete',
    method: 'post',
    data: { uuid: uuid }
  })
}

